// Camera Class, is the View of the Cmd Prompt Window
// Authors: Matthew DeNovio
#ifndef CAMERA
#define CAMERA

#include <windows.h>
#include <stdio.h>
#include <iostream>
#include "Point.h"


class Camera	
{

private:

	// Attributes

	Point topLeft;
	Point bottomRight;

	// Current Positions of the Board
	HANDLE hConsole;

	SMALL_RECT screenRect;

public:
	Camera();
	~Camera(void);

	// Visible Area of Window
	static const U16 SCREEN_TILE_HEIGHT = 7;
	static const U16 SCREEN_TILE_WIDTH = 17;

	// Tile
	static const U8	TILE_DIM = 10;

	// Max size if screen							///////////////////////////// get from File
	static const U16 locationScreenTileHeight = 40;
	static const U16 locationScreenTileWidth = 40;

	const Point& getTopLeft(){return topLeft;}
	const Point& getBottomRight(){return bottomRight;}

	void setCursorPosition(U16 x, U16 y);

	void init();

	void moveCamera(U16 x, U16 y);

	void refocus();

	void changeScreenBuffer();

	bool shiftCamera(I16 x, I16 y);

	void removeAnnoyingLines(const Point& screenShift);

};

#endif
